Integrand size = 42, antiderivative size = 305 \[ \int \sqrt {\cos (c+d x)} (a+b \cos (c+d x))^3 \left (B \cos (c+d x)+C \cos ^2(c+d x)\right ) \, dx=\frac {2 \left (27 a^2 b B+7 b^3 B+9 a^3 C+21 a b^2 C\right ) E\left (\left .\frac {1}{2} (c+d x)\right |2\right )}{15 d}+\frac {2 \left (77 a^3 B+165 a b^2 B+165 a^2 b C+45 b^3 C\right ) \operatorname {EllipticF}\left (\frac {1}{2} (c+d x),2\right )}{231 d}+\frac {2 \left (77 a^3 B+165 a b^2 B+165 a^2 b C+45 b^3 C\right ) \sqrt {\cos (c+d x)} \sin (c+d x)}{231 d}+\frac {2 \left (27 a^2 b B+7 b^3 B+9 a^3 C+21 a b^2 C\right ) \cos ^{\frac {3}{2}}(c+d x) \sin (c+d x)}{45 d}+\frac {2 b \left (33 a b B+26 a^2 C+9 b^2 C\right ) \cos ^{\frac {5}{2}}(c+d x) \sin (c+d x)}{77 d}+\frac {2 b^2 (11 b B+15 a C) \cos ^{\frac {7}{2}}(c+d x) \sin (c+d x)}{99 d}+\frac {2 b C \cos ^{\frac {5}{2}}(c+d x) (a+b \cos (c+d x))^2 \sin (c+d x)}{11 d} \]
[Out]
Time = 0.69 (sec) , antiderivative size = 305, normalized size of antiderivative = 1.00, number of steps used = 9, number of rules used = 8, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.190, Rules used = {3108, 3069, 3112, 3102, 2827, 2715, 2720, 2719} \[ \int \sqrt {\cos (c+d x)} (a+b \cos (c+d x))^3 \left (B \cos (c+d x)+C \cos ^2(c+d x)\right ) \, dx=\frac {2 b \left (26 a^2 C+33 a b B+9 b^2 C\right ) \sin (c+d x) \cos ^{\frac {5}{2}}(c+d x)}{77 d}+\frac {2 \left (77 a^3 B+165 a^2 b C+165 a b^2 B+45 b^3 C\right ) \operatorname {EllipticF}\left (\frac {1}{2} (c+d x),2\right )}{231 d}+\frac {2 \left (9 a^3 C+27 a^2 b B+21 a b^2 C+7 b^3 B\right ) E\left (\left .\frac {1}{2} (c+d x)\right |2\right )}{15 d}+\frac {2 \left (9 a^3 C+27 a^2 b B+21 a b^2 C+7 b^3 B\right ) \sin (c+d x) \cos ^{\frac {3}{2}}(c+d x)}{45 d}+\frac {2 \left (77 a^3 B+165 a^2 b C+165 a b^2 B+45 b^3 C\right ) \sin (c+d x) \sqrt {\cos (c+d x)}}{231 d}+\frac {2 b^2 (15 a C+11 b B) \sin (c+d x) \cos ^{\frac {7}{2}}(c+d x)}{99 d}+\frac {2 b C \sin (c+d x) \cos ^{\frac {5}{2}}(c+d x) (a+b \cos (c+d x))^2}{11 d} \]
[In]
[Out]
Rule 2715
Rule 2719
Rule 2720
Rule 2827
Rule 3069
Rule 3102
Rule 3108
Rule 3112
Rubi steps \begin{align*} \text {integral}& = \int \cos ^{\frac {3}{2}}(c+d x) (a+b \cos (c+d x))^3 (B+C \cos (c+d x)) \, dx \\ & = \frac {2 b C \cos ^{\frac {5}{2}}(c+d x) (a+b \cos (c+d x))^2 \sin (c+d x)}{11 d}+\frac {2}{11} \int \cos ^{\frac {3}{2}}(c+d x) (a+b \cos (c+d x)) \left (\frac {1}{2} a (11 a B+5 b C)+\frac {1}{2} \left (9 b^2 C+11 a (2 b B+a C)\right ) \cos (c+d x)+\frac {1}{2} b (11 b B+15 a C) \cos ^2(c+d x)\right ) \, dx \\ & = \frac {2 b^2 (11 b B+15 a C) \cos ^{\frac {7}{2}}(c+d x) \sin (c+d x)}{99 d}+\frac {2 b C \cos ^{\frac {5}{2}}(c+d x) (a+b \cos (c+d x))^2 \sin (c+d x)}{11 d}+\frac {4}{99} \int \cos ^{\frac {3}{2}}(c+d x) \left (\frac {9}{4} a^2 (11 a B+5 b C)+\frac {11}{4} \left (27 a^2 b B+7 b^3 B+9 a^3 C+21 a b^2 C\right ) \cos (c+d x)+\frac {9}{4} b \left (33 a b B+26 a^2 C+9 b^2 C\right ) \cos ^2(c+d x)\right ) \, dx \\ & = \frac {2 b \left (33 a b B+26 a^2 C+9 b^2 C\right ) \cos ^{\frac {5}{2}}(c+d x) \sin (c+d x)}{77 d}+\frac {2 b^2 (11 b B+15 a C) \cos ^{\frac {7}{2}}(c+d x) \sin (c+d x)}{99 d}+\frac {2 b C \cos ^{\frac {5}{2}}(c+d x) (a+b \cos (c+d x))^2 \sin (c+d x)}{11 d}+\frac {8}{693} \int \cos ^{\frac {3}{2}}(c+d x) \left (\frac {9}{8} \left (77 a^3 B+165 a b^2 B+165 a^2 b C+45 b^3 C\right )+\frac {77}{8} \left (27 a^2 b B+7 b^3 B+9 a^3 C+21 a b^2 C\right ) \cos (c+d x)\right ) \, dx \\ & = \frac {2 b \left (33 a b B+26 a^2 C+9 b^2 C\right ) \cos ^{\frac {5}{2}}(c+d x) \sin (c+d x)}{77 d}+\frac {2 b^2 (11 b B+15 a C) \cos ^{\frac {7}{2}}(c+d x) \sin (c+d x)}{99 d}+\frac {2 b C \cos ^{\frac {5}{2}}(c+d x) (a+b \cos (c+d x))^2 \sin (c+d x)}{11 d}+\frac {1}{9} \left (27 a^2 b B+7 b^3 B+9 a^3 C+21 a b^2 C\right ) \int \cos ^{\frac {5}{2}}(c+d x) \, dx+\frac {1}{77} \left (77 a^3 B+165 a b^2 B+165 a^2 b C+45 b^3 C\right ) \int \cos ^{\frac {3}{2}}(c+d x) \, dx \\ & = \frac {2 \left (77 a^3 B+165 a b^2 B+165 a^2 b C+45 b^3 C\right ) \sqrt {\cos (c+d x)} \sin (c+d x)}{231 d}+\frac {2 \left (27 a^2 b B+7 b^3 B+9 a^3 C+21 a b^2 C\right ) \cos ^{\frac {3}{2}}(c+d x) \sin (c+d x)}{45 d}+\frac {2 b \left (33 a b B+26 a^2 C+9 b^2 C\right ) \cos ^{\frac {5}{2}}(c+d x) \sin (c+d x)}{77 d}+\frac {2 b^2 (11 b B+15 a C) \cos ^{\frac {7}{2}}(c+d x) \sin (c+d x)}{99 d}+\frac {2 b C \cos ^{\frac {5}{2}}(c+d x) (a+b \cos (c+d x))^2 \sin (c+d x)}{11 d}+\frac {1}{15} \left (27 a^2 b B+7 b^3 B+9 a^3 C+21 a b^2 C\right ) \int \sqrt {\cos (c+d x)} \, dx+\frac {1}{231} \left (77 a^3 B+165 a b^2 B+165 a^2 b C+45 b^3 C\right ) \int \frac {1}{\sqrt {\cos (c+d x)}} \, dx \\ & = \frac {2 \left (27 a^2 b B+7 b^3 B+9 a^3 C+21 a b^2 C\right ) E\left (\left .\frac {1}{2} (c+d x)\right |2\right )}{15 d}+\frac {2 \left (77 a^3 B+165 a b^2 B+165 a^2 b C+45 b^3 C\right ) \operatorname {EllipticF}\left (\frac {1}{2} (c+d x),2\right )}{231 d}+\frac {2 \left (77 a^3 B+165 a b^2 B+165 a^2 b C+45 b^3 C\right ) \sqrt {\cos (c+d x)} \sin (c+d x)}{231 d}+\frac {2 \left (27 a^2 b B+7 b^3 B+9 a^3 C+21 a b^2 C\right ) \cos ^{\frac {3}{2}}(c+d x) \sin (c+d x)}{45 d}+\frac {2 b \left (33 a b B+26 a^2 C+9 b^2 C\right ) \cos ^{\frac {5}{2}}(c+d x) \sin (c+d x)}{77 d}+\frac {2 b^2 (11 b B+15 a C) \cos ^{\frac {7}{2}}(c+d x) \sin (c+d x)}{99 d}+\frac {2 b C \cos ^{\frac {5}{2}}(c+d x) (a+b \cos (c+d x))^2 \sin (c+d x)}{11 d} \\ \end{align*}
Time = 3.43 (sec) , antiderivative size = 235, normalized size of antiderivative = 0.77 \[ \int \sqrt {\cos (c+d x)} (a+b \cos (c+d x))^3 \left (B \cos (c+d x)+C \cos ^2(c+d x)\right ) \, dx=\frac {3696 \left (27 a^2 b B+7 b^3 B+9 a^3 C+21 a b^2 C\right ) E\left (\left .\frac {1}{2} (c+d x)\right |2\right )+240 \left (77 a^3 B+165 a b^2 B+165 a^2 b C+45 b^3 C\right ) \operatorname {EllipticF}\left (\frac {1}{2} (c+d x),2\right )+2 \sqrt {\cos (c+d x)} \left (154 \left (108 a^2 b B+43 b^3 B+36 a^3 C+129 a b^2 C\right ) \cos (c+d x)+180 b \left (33 a b B+33 a^2 C+16 b^2 C\right ) \cos (2 (c+d x))+770 b^2 (b B+3 a C) \cos (3 (c+d x))+15 \left (616 a^3 B+1716 a b^2 B+1716 a^2 b C+531 b^3 C+21 b^3 C \cos (4 (c+d x))\right )\right ) \sin (c+d x)}{27720 d} \]
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. \(824\) vs. \(2(333)=666\).
Time = 7.15 (sec) , antiderivative size = 825, normalized size of antiderivative = 2.70
method | result | size |
default | \(\text {Expression too large to display}\) | \(825\) |
parts | \(\text {Expression too large to display}\) | \(1063\) |
[In]
[Out]
Result contains higher order function than in optimal. Order 9 vs. order 4.
Time = 0.15 (sec) , antiderivative size = 358, normalized size of antiderivative = 1.17 \[ \int \sqrt {\cos (c+d x)} (a+b \cos (c+d x))^3 \left (B \cos (c+d x)+C \cos ^2(c+d x)\right ) \, dx=\frac {2 \, {\left (315 \, C b^{3} \cos \left (d x + c\right )^{4} + 1155 \, B a^{3} + 2475 \, C a^{2} b + 2475 \, B a b^{2} + 675 \, C b^{3} + 385 \, {\left (3 \, C a b^{2} + B b^{3}\right )} \cos \left (d x + c\right )^{3} + 135 \, {\left (11 \, C a^{2} b + 11 \, B a b^{2} + 3 \, C b^{3}\right )} \cos \left (d x + c\right )^{2} + 77 \, {\left (9 \, C a^{3} + 27 \, B a^{2} b + 21 \, C a b^{2} + 7 \, B b^{3}\right )} \cos \left (d x + c\right )\right )} \sqrt {\cos \left (d x + c\right )} \sin \left (d x + c\right ) - 15 \, \sqrt {2} {\left (77 i \, B a^{3} + 165 i \, C a^{2} b + 165 i \, B a b^{2} + 45 i \, C b^{3}\right )} {\rm weierstrassPInverse}\left (-4, 0, \cos \left (d x + c\right ) + i \, \sin \left (d x + c\right )\right ) - 15 \, \sqrt {2} {\left (-77 i \, B a^{3} - 165 i \, C a^{2} b - 165 i \, B a b^{2} - 45 i \, C b^{3}\right )} {\rm weierstrassPInverse}\left (-4, 0, \cos \left (d x + c\right ) - i \, \sin \left (d x + c\right )\right ) - 231 \, \sqrt {2} {\left (-9 i \, C a^{3} - 27 i \, B a^{2} b - 21 i \, C a b^{2} - 7 i \, B b^{3}\right )} {\rm weierstrassZeta}\left (-4, 0, {\rm weierstrassPInverse}\left (-4, 0, \cos \left (d x + c\right ) + i \, \sin \left (d x + c\right )\right )\right ) - 231 \, \sqrt {2} {\left (9 i \, C a^{3} + 27 i \, B a^{2} b + 21 i \, C a b^{2} + 7 i \, B b^{3}\right )} {\rm weierstrassZeta}\left (-4, 0, {\rm weierstrassPInverse}\left (-4, 0, \cos \left (d x + c\right ) - i \, \sin \left (d x + c\right )\right )\right )}{3465 \, d} \]
[In]
[Out]
Timed out. \[ \int \sqrt {\cos (c+d x)} (a+b \cos (c+d x))^3 \left (B \cos (c+d x)+C \cos ^2(c+d x)\right ) \, dx=\text {Timed out} \]
[In]
[Out]
\[ \int \sqrt {\cos (c+d x)} (a+b \cos (c+d x))^3 \left (B \cos (c+d x)+C \cos ^2(c+d x)\right ) \, dx=\int { {\left (C \cos \left (d x + c\right )^{2} + B \cos \left (d x + c\right )\right )} {\left (b \cos \left (d x + c\right ) + a\right )}^{3} \sqrt {\cos \left (d x + c\right )} \,d x } \]
[In]
[Out]
\[ \int \sqrt {\cos (c+d x)} (a+b \cos (c+d x))^3 \left (B \cos (c+d x)+C \cos ^2(c+d x)\right ) \, dx=\int { {\left (C \cos \left (d x + c\right )^{2} + B \cos \left (d x + c\right )\right )} {\left (b \cos \left (d x + c\right ) + a\right )}^{3} \sqrt {\cos \left (d x + c\right )} \,d x } \]
[In]
[Out]
Time = 3.20 (sec) , antiderivative size = 364, normalized size of antiderivative = 1.19 \[ \int \sqrt {\cos (c+d x)} (a+b \cos (c+d x))^3 \left (B \cos (c+d x)+C \cos ^2(c+d x)\right ) \, dx=\frac {B\,a^3\,\left (\frac {2\,\sqrt {\cos \left (c+d\,x\right )}\,\sin \left (c+d\,x\right )}{3}+\frac {2\,\mathrm {F}\left (\frac {c}{2}+\frac {d\,x}{2}\middle |2\right )}{3}\right )}{d}-\frac {2\,C\,a^3\,{\cos \left (c+d\,x\right )}^{7/2}\,\sin \left (c+d\,x\right )\,{{}}_2{\mathrm {F}}_1\left (\frac {1}{2},\frac {7}{4};\ \frac {11}{4};\ {\cos \left (c+d\,x\right )}^2\right )}{7\,d\,\sqrt {{\sin \left (c+d\,x\right )}^2}}-\frac {2\,B\,b^3\,{\cos \left (c+d\,x\right )}^{11/2}\,\sin \left (c+d\,x\right )\,{{}}_2{\mathrm {F}}_1\left (\frac {1}{2},\frac {11}{4};\ \frac {15}{4};\ {\cos \left (c+d\,x\right )}^2\right )}{11\,d\,\sqrt {{\sin \left (c+d\,x\right )}^2}}-\frac {2\,C\,b^3\,{\cos \left (c+d\,x\right )}^{13/2}\,\sin \left (c+d\,x\right )\,{{}}_2{\mathrm {F}}_1\left (\frac {1}{2},\frac {13}{4};\ \frac {17}{4};\ {\cos \left (c+d\,x\right )}^2\right )}{13\,d\,\sqrt {{\sin \left (c+d\,x\right )}^2}}-\frac {6\,B\,a^2\,b\,{\cos \left (c+d\,x\right )}^{7/2}\,\sin \left (c+d\,x\right )\,{{}}_2{\mathrm {F}}_1\left (\frac {1}{2},\frac {7}{4};\ \frac {11}{4};\ {\cos \left (c+d\,x\right )}^2\right )}{7\,d\,\sqrt {{\sin \left (c+d\,x\right )}^2}}-\frac {2\,B\,a\,b^2\,{\cos \left (c+d\,x\right )}^{9/2}\,\sin \left (c+d\,x\right )\,{{}}_2{\mathrm {F}}_1\left (\frac {1}{2},\frac {9}{4};\ \frac {13}{4};\ {\cos \left (c+d\,x\right )}^2\right )}{3\,d\,\sqrt {{\sin \left (c+d\,x\right )}^2}}-\frac {2\,C\,a^2\,b\,{\cos \left (c+d\,x\right )}^{9/2}\,\sin \left (c+d\,x\right )\,{{}}_2{\mathrm {F}}_1\left (\frac {1}{2},\frac {9}{4};\ \frac {13}{4};\ {\cos \left (c+d\,x\right )}^2\right )}{3\,d\,\sqrt {{\sin \left (c+d\,x\right )}^2}}-\frac {6\,C\,a\,b^2\,{\cos \left (c+d\,x\right )}^{11/2}\,\sin \left (c+d\,x\right )\,{{}}_2{\mathrm {F}}_1\left (\frac {1}{2},\frac {11}{4};\ \frac {15}{4};\ {\cos \left (c+d\,x\right )}^2\right )}{11\,d\,\sqrt {{\sin \left (c+d\,x\right )}^2}} \]
[In]
[Out]